import { request } from '@umijs/max';
import api from '@/services/api';

export async function portMappingList(params) {
  return request(api.port_mapping_list, {
    method: 'GET',
    params,
  });
}

export async function portMappingDetail(params) {
  return request(api.port_mapping_detail, {
    method: 'GET',
    params,
  });
}

export async function portMappingCreate(data) {
  return request(api.port_mapping_create, {
    method: 'POST',
    data,
  });
}

export async function portMappingUpdate(data) {
  return request(api.port_mapping_update, {
    method: 'PUT',
    data,
  });
}

export async function portMappingDelete(params) {
  return request(api.port_mapping_delete, {
    method: 'DELETE',
    params,
  });
}

export async function portMappingConnectList(params) {
  return request(api.port_mapping_connect_list, {
    method: 'GET',
    params,
  });
}

export async function portMappingConnectKill(params) {
  return request(api.port_mapping_connect_kill, {
    method: 'GET',
    params,
  });
}

export async function portMappingConnectBan(params) {
  return request(api.port_mapping_connect_ban, {
    method: 'GET',
    params,
  });
}

